<?php
/**
 * @version		$Id: default_items.php 13471 2009-11-12 00:38:49Z eddieajau
 * @package		Joomla.Site
 * @subpackage	com_weblinks
 * @copyright	Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

// no direct access
defined('_JEXEC') or die;
// Code to support edit links for weblinks
// Create a shortcut for params.
$params = &$this->item->params;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::core();

// Get the user object.
$user = JFactory::getUser();
// Check if user is allowed to add/edit based on weblinks permissinos.
$canEdit = $user->authorise('core.edit', 'com_weblinks');
$canCreate = $user->authorise('core.create', 'com_weblinks');
$canEditState = $user->authorise('core.edit.state', 'com_weblinks');

$n = count($this->items);
$listOrder	= $this->escape($this->state->get('list.ordering'));
$listDirn	= $this->escape($this->state->get('list.direction'));
?>


<ul class="linkList">	
	<?php foreach ($this->items as $i => $item) : ?>
    		<?php if ($item->params->get('file')):?>		
			<li>			
				<a href="upload/files/<?php echo $item->params->get('file');?>">
								<?php echo $this->escape($item->title);?>
                 </a>						
			</li>
            <?php endif;?>			
	<?php endforeach; ?>
</ul>
	<?php if ($this->params->get('show_pagination')) : ?>
		 <div class="pageNav">
			<?php if ($this->params->def('show_pagination_results', 1)) : ?>
				<div class="pageCounter">
					<?php echo $this->pagination->getPagesCounter(); ?>
				</div>
			<?php endif; ?>
				<?php echo $this->pagination->getPagesLinks(); ?>
			</div>
		<?php endif; ?>

